<?php
/*
 * 图像生成验证类
 * @arrange Mark
 * @package ixdcw
 * @file    captcha.png.php
 * @time    12-12-19 上午10:33
 */
define('DT_NONUSER', true);
require '../common.inc.php';
Env::checkReferer() or exit;
Session::start();
require DT_INC.'/captcha.class.php';
$do = new captcha;
$do->font = DT_ROOT.'/file/font/'.$DT['water_font'];
if($DT['captcha_cn']) $do->cn = is_file($do->font);
$do->charset = strtolower(DT_CHARSET);
$do->ip = $DT_IP;
if($action == 'question') {
	$id = isset($id) ? trim($id) : 'questionstr';
	$do->question($id);
} else {
	if($DT['captcha_chars']) $do->chars = trim($DT['captcha_chars']);
	$do->image();
}